<%@ page language="java" contentType="text/xml; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page trimDirectiveWhitespaces="true"%>
<%@page import="com.glowdayz.common.DBHandler"%>
<%@page import="com.glowdayz.common.ApiHandler"%>
<%@page import="com.glowdayz.common.ApiHandler.XmlData"%>
<%@page import="com.glowdayz.glowmee.cmd.RegisterCMD"%>
<%@page import="com.glowdayz.glowmee.dao.RegisterDAO"%>
<%@page import="java.util.ArrayList"%>
<%
	DBHandler.getInstance().connect();

	ApiHandler web = new ApiHandler(request, out, "JSPglowmee");
	
	int id = web.getInt("id");
	int result = 0;
	
	RegisterCMD cmd = new RegisterCMD(id, 0);
	result = RegisterDAO.getInstance().unActivityRegister(cmd);
	
	if (result < 1) {
		DBHandler.getInstance().disconnect();
		web.result(null, "탈퇴처리가 실패되었습니다.");
		return;
	}
	
	DBHandler.getInstance().disconnect();
	
	ArrayList<XmlData> list = new ArrayList<XmlData>();
	web.result("SUCCESS", "탈퇴처리가 완료되었습니다.", list);
%>